package com.java.jvm.oom;

/**
 * @author wangning
 * @date 2023/5/18 16:53
 * Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
 */
public class OutOfMemoryErrorDemo {
    public static void main(String[] args) {
        StringBuilder str = new StringBuilder("hello world");
        while (true) {
            str.append(str);
        }
    }
}
